package com.fruits.login.dto;

import javax.validation.constraints.NotBlank;

public class LoginDto {

    private Long timestamp;
    private String uid;
    @NotBlank(message = "MAC不能为空")
    private String deviceMac;
    private int type;
    private String sign;

    private String phone;
    private String code;

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getDeviceMac() {
        return deviceMac;
    }

    public void setDeviceMac(String deviceMac) {
        this.deviceMac = deviceMac;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "PlayerLoginInfo{" + "timestamp='" + timestamp + '\'' + ", uid='" + uid + '\'' + ", deviceMac='" + deviceMac + '\'' + ", type=" + type + ", sign='" + sign + '\'' + ", phone='" + phone + '\'' + ", code='" + code + '\'' + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LoginDto loginInfo = (LoginDto) o;
        return deviceMac != null ? deviceMac.equals(loginInfo.deviceMac) : loginInfo.deviceMac == null;
    }

    @Override
    public int hashCode() {
        return deviceMac != null ? deviceMac.hashCode() : 0;
    }
}
